home *** CD-ROM | disk | FTP | other *** search
- char EMassertMessage[] = "Assertion (%s) failed: file %s, line %d\n";
- #include <stdio.h>
- #include <sys/signal.h>
- #include "Kernel/h/stdTypes.h"
- #include "Kernel/h/system.h"
-
- extern NodeNum GetLNN();
- extern void shutdownOID();
-
- void _flushall()
- {
- #ifdef BSD
- extern int fflush();
- _fwalk(fflush);
- #endif
- }
-
- extern die();
-
- abortxx()
- {
- _flushall();
- #ifdef vax
- asm(" halt");
- #endif
- #ifdef sun
- asm("stop #0");
- #endif
- }
-
- /*
- * Prepare to abort. We would like to have a core dump so we cancel all
- * our signal stuff first (BSD only).
- */
- abort()
- {
- ErrMsg("Kernel aborting to obtain core dump\n");
-
- #ifdef BSD
- {
- struct sigvec vec; /* used in sigvec() calls */
-
- vec.sv_handler = SIG_DFL;
- vec.sv_mask = 0; /* All signals enabled */
- vec.sv_onstack = 0;
- sigvec(SIGINT, &vec, 0); /* 0 means do not tell me old sighandler */
- sigvec(SIGTERM, &vec, 0);
- sigvec(SIGILL, &vec, 0);
- sigvec(SIGBUS, &vec, 0);
- sigvec(SIGSEGV, &vec, 0);
- }
- #endif
-
- SendShutDownMsg(GetLNN());
- shutdownOID();
-
- abortxx();
- }
-